﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dijiang.Values
{
    public class DString : DValue
    {
        public string value;
        public DString(string value)
        {
            this.value = value;
        }

        public DValue Eval(CmdEnv env)
        {
            return this;
        }

        public DValue Copy()
        {
            return new DString(value);
        }
        public override string ToString()
        {
            return $"\"{value}\"";
        }

        public bool Equals(DValue? other)
        {
            if (other is DString os)
            {
                return value == os.value;
            }

            return false;
        }
    }
}
